home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 4.00 Begin VB.Form IconBook AutoRedraw = -1 'True BackColor = &H00C0C0C0& Caption = "IconAlbum Deluxe" ClientHeight = 8595 ClientLeft = 570 ClientTop = 210 ClientWidth = 11175 Height = 9000 Icon = "IconBook.frx":0000 Left = 510 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 573 ScaleMode = 3 'Pixel ScaleWidth = 745 Top = -135 Width = 11295 Begin VB.Frame Frame1 BackColor = &H00C0C0C0& Caption = "Selected Icon" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = -1 'True Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H000000C0& Height = 2400 Left = 0 TabIndex = 5 Top = 4815 Width = 2505 Begin VB.PictureBox Pic3 BackColor = &H00C0C0C0& BorderStyle = 0 'None Height = 480 Left = 225 ScaleHeight = 32 ScaleMode = 3 'Pixel ScaleWidth = 32 TabIndex = 8 Top = 930 Width = 480 End Begin VB.Shape Shape2 BackColor = &H00E0E0E0& BorderColor = &H00008000& BorderWidth = 3 Height = 1050 Left = 960 Shape = 5 'Rounded Square Top = 750 Width = 1110 End Begin VB.Label Label4 Alignment = 2 'Center BackColor = &H00C0C0C0& ForeColor = &H00C00000& Height = 240 Left = 135 TabIndex = 7 Top = 360 Width = 1995 End Begin VB.Image Image1 Height = 990 Left = 1020 Stretch = -1 'True Top = 765 Width = 960 End Begin VB.Shape Shape1 BackColor = &H00E0E0E0& BorderColor = &H00008000& BorderWidth = 3 Height = 645 Left = 165 Shape = 5 'Rounded Square Top = 840 Width = 645 End Begin VB.Label Label3 Alignment = 2 'Center BackColor = &H00008000& BorderStyle = 1 'Fixed Single ForeColor = &H0080FFFF& Height = 285 Left = 45 TabIndex = 6 Top = 1935 Width = 2355 End End Begin VB.PictureBox Pic2 AutoRedraw = -1 'True BackColor = &H00C0C0C0& Height = 7980 Left = 2580 ScaleHeight = 528 ScaleMode = 3 'Pixel ScaleWidth = 567 TabIndex = 2 Top = 555 Width = 8565 Begin VB.Image Im1 Height = 480 Index = 0 Left = 45 Top = 45 Visible = 0 'False Width = 480 End End Begin VB.DirListBox Dir1 BackColor = &H00E0E0E0& BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 3630 Left = 0 TabIndex = 1 Top = 555 Width = 2490 End Begin VB.FileListBox File1 Height = 3375 Left = 2520 Pattern = "*.ico" TabIndex = 0 Top = 3690 Visible = 0 'False Width = 1590 End Begin VB.PictureBox ImageList1 BackColor = &H80000005& Height = 480 Left = 450 ScaleHeight = 420 ScaleWidth = 1140 TabIndex = 9 Top = 3420 Width = 1200 End Begin VB.Image Tool1 Height = 360 Index = 6 Left = 2385 Picture = "IconBook.frx":0442 Top = 45 Width = 345 End Begin VB.Image Tool1 Height = 360 Index = 5 Left = 1935 Picture = "IconBook.frx":05E4 Top = 45 Width = 345 End Begin VB.Image Tool1 Height = 360 Index = 4 Left = 1485 Picture = "IconBook.frx":0786 Top = 45 Width = 345 End Begin VB.Image Tool1 Height = 360 Index = 3 Left = 1125 Picture = "IconBook.frx":0928 Top = 45 Width = 345 End Begin VB.Image Tool1 Height = 360 Index = 2 Left = 765 Picture = "IconBook.frx":0ACA Top = 45 Width = 345 End Begin VB.Image Tool1 Height = 360 Index = 1 Left = 405 Picture = "IconBook.frx":0C6C Top = 45 Width = 345 End Begin VB.Image Tool1 Height = 360 Index = 0 Left = 45 Picture = "IconBook.frx":0E0E Top = 45 Width = 345 End Begin VB.Image Image2 Height = 360 Index = 13 Left = 2160 Picture = "IconBook.frx":0FB0 Top = 7830 Visible = 0 'False Width = 345 End Begin VB.Image Image2 Height = 360 Index = 12 Left = 1800 Picture = "IconBook.frx":1152 Top = 7830 Visible = 0 'False Width = 345 End Begin VB.Image Image2 Height = 360 Index = 11 Left = 1440 Picture = "IconBook.frx":12F4 Top = 7830 Visible = 0 'False Width = 345 End Begin VB.Image Image2 Height = 360 Index = 10 Left = 1080 Picture = "IconBook.frx":1496 Top = 7830 Visible = 0 'False Width = 345 End Begin VB.Image Image2 Height = 360 Index = 9 Left = 720 Picture = "IconBook.frx":1638 Top = 7830 Visible = 0 'False Width = 345 End Begin VB.Image Image2 Height = 360 Index = 8 Left = 360 Picture = "IconBook.frx":17DA Top = 7830 Visible = 0 'False Width = 345 End Begin VB.Image Image2 Height = 360 Index = 7 Left = 0 Picture = "IconBook.frx":197C Top = 7830 Visible = 0 'False Width = 345 End Begin VB.Image Image2 Height = 360 Index = 6 Left = 2160 Picture = "IconBook.frx":1B1E Top = 7470 Visible = 0 'False Width = 345 End Begin VB.Image Image2 Height = 360 Index = 5 Left = 1800 Picture = "IconBook.frx":1CC0 Top = 7470 Visible = 0 'False Width = 345 End Begin VB.Image Image2 Height = 360 Index = 4 Left = 1440 Picture = "IconBook.frx":1E62 Top = 7470 Visible = 0 'False Width = 345 End Begin VB.Image Image2 Height = 360 Index = 3 Left = 1080 Picture = "IconBook.frx":2004 Top = 7470 Visible = 0 'False Width = 345 End Begin VB.Image Image2 Height = 360 Index = 2 Left = 720 Picture = "IconBook.frx":21A6 Top = 7470 Visible = 0 'False Width = 345 End Begin VB.Image Image2 Height = 360 Index = 1 Left = 360 Picture = "IconBook.frx":2348 Top = 7470 Visible = 0 'False Width = 345 End Begin VB.Image Image2 Height = 360 Index = 0 Left = 0 Picture = "IconBook.frx":24EA Top = 7470 Visible = 0 'False Width = 345 End Begin MSComDlg.CommonDialog ComD1 Left = 1845 Top = 6975 _ExtentX = 847 _ExtentY = 847 _Version = 393216 Flags = 2 End Begin VB.Label Label2 Alignment = 2 'Center BackColor = &H00C0C0C0& BorderStyle = 1 'Fixed Single BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 510 Left = 0 TabIndex = 4 Top = 4230 Width = 2490 End Begin VB.Line Line2 BorderColor = &H00E0E0E0& X1 = 0 X2 = 744 Y1 = 34 Y2 = 34 End Begin VB.Line Line1 BorderColor = &H00808080& X1 = 0 X2 = 744 Y1 = 33 Y2 = 33 End Begin VB.Label Label1 BackColor = &H00C0C0C0& BorderStyle = 1 'Fixed Single BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 330 Left = 2820 TabIndex = 3 Top = 75 Width = 8310 End Begin VB.Menu mnuFile Caption = "" Visible = 0 'False Begin VB.Menu mnuSaveAs Caption = "Save Icon As" End Begin VB.Menu mnubar0 Caption = "-" End Begin VB.Menu mnuMove Caption = "Move Icon" End Begin VB.Menu mnubar1 Caption = "-" End Begin VB.Menu mnuDelete Caption = "Delete Icon" End Begin VB.Menu mnubar2 Caption = "-" End Begin VB.Menu mnuRenameIcon Caption = "Rename Icon" End End Attribute VB_Name = "IconBook" Attribute VB_Creatable = False Attribute VB_Exposed = False Private Sub Newdir() 'Make new dir On Error GoTo mkdir0 Inp1 = InputBox("Type the name of the new directory" & vbCr & "you want to create.", "IconAlbumDeluxe - New directory") If Inp1 = "" Then Exit Sub MkDir IBpath$ & "\" & Inp1 Dir1.Refresh Pic2.SetFocus Exit Sub mkdir0: Message = MsgBox("Cannot create the directory: " & Temp$ & vbCr & vbCr & "That directory already exists !", vbOKOnly + vbInformation, "IconAlbum Deluxe - System Message") End Sub Private Sub Search() SearchForm.Show 1 Pic2.SetFocus End Sub Private Sub Dir1_Change() Dir1.Path = IBpath End Sub Private Sub Dir1_Click() Label3.Caption = "" Label4.Caption = "No icon selected" Pic3.Picture = LoadPicture("") Image1.Picture = LoadPicture("") File1.Path = Dir1.List(Dir1.ListIndex) If File1.ListCount <= 240 Then Idx% = File1.ListCount - 1 Idx% = 239 Message = MsgBox("This map contains more than 240 icons..." & vbCr & "Only 240 icons will be shown !" & vbCr & vbCr & "You better create onother map of the same object" & vbCr & "to store some of the icons in it...", vbOKOnly + vbInformation, "IconAlbum Deluxe - System Message") End If Label1.Caption = Dir1.List(Dir1.ListIndex) Label2.Caption = "Icons in map:" & vbCr & Idx% + 1 DoEvents Screen.MousePointer = 11 For xx% = 0 To Idx% If Right(File1.Path, 1) = "\" Then Im1(xx%).Picture = LoadPicture(File1.Path + File1.List(xx%)) Im1(xx%).Picture = LoadPicture(File1.Path + "\" + File1.List(xx%)) End If Im1(xx).Visible = True Next xx% Screen.MousePointer = 1 If Idx < 239 Then For xx = Idx + 1 To 239 Im1(xx%).Picture = LoadPicture("") Im1(xx).Visible = False Next xx End If End Sub Private Sub Form_Activate() 'Pic2.SetFocus End Sub Private Sub Form_Load() Dim HelpTxt$ IBpath = App.Path IconBook.Move (Screen.Width - IconBook.Width) / 2, (Screen.Height - IconBook.Height) / 2 Label4.Caption = "No icon selected" For xx = 0 To 6 Tool1(xx).Picture = Image2(xx).Picture Next xx For xx = 1 To 239 Load Im1(xx%) Next xx For xx = 0 To 15 Im1(xx%).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 16).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 32).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 48).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 64).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 80).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 96).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 112).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 128).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 144).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 160).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 176).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 192).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 208).Left = Im1(0).Left + (xx% * 35) Im1(xx% + 224).Left = Im1(0).Left + (xx% * 35) Im1(xx%).Top = Im1(0).Top Im1(xx% + 16).Top = Im1(0).Top + 35 Im1(xx% + 32).Top = Im1(0).Top + 70 Im1(xx% + 48).Top = Im1(0).Top + 105 Im1(xx% + 64).Top = Im1(0).Top + 140 Im1(xx% + 80).Top = Im1(0).Top + 175 Im1(xx% + 96).Top = Im1(0).Top + 210 Im1(xx% + 112).Top = Im1(0).Top + 245 Im1(xx% + 128).Top = Im1(0).Top + 280 Im1(xx% + 144).Top = Im1(0).Top + 315 Im1(xx% + 160).Top = Im1(0).Top + 350 Im1(xx% + 176).Top = Im1(0).Top + 385 Im1(xx% + 192).Top = Im1(0).Top + 420 Im1(xx% + 208).Top = Im1(0).Top + 455 Im1(xx% + 224).Top = Im1(0).Top + 490 Next xx% Dir1.Path = IBpath For xx = 0 To 14 Pic2.Line (Im1(xx).Left + 33, 0)-(Im1(xx).Left + 33, Pic2.ScaleHeight), RGB(170, 180, 170) Next xx For xx = 1 To 15 Pic2.Line (0, Im1(0).Top - 1 + (xx * 35))-(Pic2.ScaleWidth, Im1(0).Top - 1 + (xx * 35)), RGB(170, 180, 170) Next xx End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) End Sub Private Sub Form_Resize() IconBook.Width = 11295 IconBook.Height = 9000 End Sub Private Sub mnuDelete_Click() Message = MsgBox("Are you sure you want to delete the icon:" & vbCr & vbCr & Dir1.List(Dir1.ListIndex) & "\" & File1.List(IconIdx), vbOKCancel + vbQuestion, "IconAlbum Deluxe - System Message") If Message = vbCancel Then Exit Sub Kill Dir1.List(Dir1.ListIndex) & "\" & File1.List(IconIdx%) File1.Refresh Dir1_Click End Sub Private Sub mnuMove_Click() Dim Oldpath$, Newpath$ Oldpath$ = Dir1.List(Dir1.ListIndex) On Error GoTo mnuMove2 Inp1 = InputBox("You want to move the icon:" & vbCr & Dir1.List(Dir1.ListIndex) & "\" & File1.List(IconIdx%) & vbCr & vbCr & "Type the name of the destination map:" & vbCr, "IconAlbumDeluxe - Move Icon") If Inp1 = "" Then Exit Sub FileCopy Oldpath$ & "\" & File1.List(IconIdx%), IBpath & "\" & Inp1 & "\" & File1.List(IconIdx%) Kill Oldpath & "\" & File1.List(IconIdx%) File1.Refresh Dir1_Click Exit Sub mnuMove2: If Err = 76 Then Message = MsgBox("The map " & Inp1 & " does not exist !" & vbCr & vbCr & "Do you want me to create it ?", vbOKCancel + vbQuestion, "IconAlbum Deluxe - System Message") If Message = vbCancel Then Exit Sub MkDir IBpath & "\" & Inp1 Dir1.Refresh FileCopy Oldpath$ & "\" & File1.List(IconIdx%), IBpath & "\" & Inp1 & "\" & File1.List(IconIdx%) Kill Oldpath$ & "\" & File1.List(IconIdx%) File1.Refresh Dir1_Click Exit Sub End If Message = MsgBox("There's a copy error !", vbOKOnly + vbExclamation, "IconAlbum Deluxe - System Message") End Sub Private Sub mnuRenameIcon_Click() Dim Oldpath$, Newpath$ Oldpath$ = Dir1.List(Dir1.ListIndex) & "\" & File1.List(IconIdx) On Error GoTo mnuMove2 Inp1 = InputBox("You want to rename the icon:" & vbCr & Dir1.List(Dir1.ListIndex) & "\" & File1.List(IconIdx%) & vbCr & vbCr & "Type the new iconname (without the extention .ico)" & vbCr, "IconAlbumDeluxe - Rename Icon") If Inp1 = "" Then Exit Sub Newpath$ = Dir1.List(Dir1.ListIndex) & "\" & Inp1 & ".ico" Message = MsgBox("You want to rename the icon: " & vbCr & Oldpath$ & vbCr & "as " & Newpath$ & vbCr & vbCr & "Continue ?", vbOKCancel + vbQuestion, "IconAlbum Deluxe - System Message") If Message = vbCancel Then Exit Sub Name Oldpath$ As Newpath$ File1.Refresh Dir1_Click Label3.Caption = File1.List(IconIdx%) Exit Sub mnuMove2: Message = MsgBox("Cannot rename the directory: " & vbCr & Oldpath$, vbOKOnly + vbExclamation, "IconAlbum Deluxe - System Message") End Sub Private Sub mnuSaveAs_Click() On Error GoTo NoSave ComD1.filename = File1.List(IconIdx%) ComD1.DialogTitle = "Save Icon" ComD1.ShowSave SavePicture Pic3.Picture, ComD1.filename NoSave: End Sub Private Sub Im1_Click(Index As Integer) 'Pic3.Width = Im1(Index).Width 'Pic3.Height = Im1(Index).Height IconIdx% = Index Pic3.Picture = LoadPicture(File1.Path + "\" + File1.List(IconIdx)) Image1.Picture = LoadPicture(File1.Path + "\" + File1.List(IconIdx)) Label3.Caption = File1.List(IconIdx%) Label4.Caption = Im1(Index).Width & " X " & Im1(Index).Height & " Icon" PopupMenu mnuFile, , Pic2.Left + Im1(Index).Left + 32, Pic2.Top + Im1(Index).Top + 32 End Sub Private Sub RemoveDirectory() On Error GoTo Remove2 Message = MsgBox("You want to remove the directory:" & vbCr & Dir1.List(Dir1.ListIndex) & vbCr & vbCr & "If the directory contains files," & vbCr & "it cannot be removed..." & vbCr & vbCr & "Do you wish to continue ?", vbOKCancel + vbQuestion, "IconAlbum Deluxe - System Message") If Message = vbCancel Then Exit Sub RmDir (Dir1.List(Dir1.ListIndex)) Dir1.Refresh Exit Sub Remove2: Message = MsgBox("Cannot remove the directory: " & vbCr & Dir1.List(Dir1.ListIndex) & vbCr & vbCr & "The directory probably contains files...", vbOKOnly + vbExclamation, "IconAlbum Deluxe - System Message") End Sub Private Sub RenameDirectory() Dim Oldpath$, Newpath$ Oldpath$ = Dir1.List(Dir1.ListIndex) On Error GoTo Rename2 Inp1 = InputBox("You want to rename the directory:" & vbCr & Oldpath$ & vbCr & vbCr & "Type the new name of the map:", "IconAlbumDeluxe - Rename directory") If Inp1 = "" Then Exit Sub For xx = Len(Oldpath$) To 1 Step -1 If Mid(Oldpath$, xx, 1) = "\" Then Newpath$ = Left(Oldpath$, xx) Exit For End If Next xx Newpath$ = Newpath$ & Inp1 Temp = MsgBox("You want to rename the directory: " & vbCr & Oldpath$ & vbCr & "as " & Newpath$ & vbCr & vbCr & "Continue ?", vbOKCancel + vbQuestion, "IconAlbum Deluxe - System Message") If Temp = vbCancel Then Exit Sub Name Oldpath$ As Newpath$ Dir1.Refresh Exit Sub Rename2: Temp = MsgBox("Cannot rename the directory: " & vbCr & Oldpath$, vbOKOnly + vbExclamation, "IconAlbum Deluxe - System Message") End Sub Private Sub KillAll() Dim Tel% Temp = MsgBox("Remove all icons from the directory: " & vbCr & Dir1.List(Dir1.ListIndex), vbOKCancel + vbQuestion, "IconAlbum Deluxe - System Message") If Temp = vbCancel Then Exit Sub Tel% = File1.ListCount Screen.MousePointer = 11 For xx = 0 To File1.ListCount - 1 Kill Dir1.List(Dir1.ListIndex) & "\" & File1.List(xx) Next xx Screen.MousePointer = 1 File1.Refresh Dir1_Click Temp = MsgBox("Just killed " & Tel & " Icons...", vbOKOnly + vbExclamation, "IconAlbum Deluxe - System Message") End Sub Private Sub CopyAll() Dim Oldpath$, Newpath$ Oldpath$ = Dir1.List(Dir1.ListIndex) On Error GoTo mnuMove2 Inp1 = InputBox("You want to move the whole map:" & vbCr & Dir1.List(Dir1.ListIndex) & vbCr & vbCr & "Type the name of the destination map:" & vbCr, "IconAlbumDeluxe - Move Icon") If Inp1 = "" Then Exit Sub Screen.MousePointer = 11 For xx = 0 To File1.ListCount - 1 FileCopy Oldpath$ & "\" & File1.List(xx), IBpath & "\" & Inp1 & "\" & File1.List(xx) Kill Oldpath & "\" & File1.List(xx) Next xx Screen.MousePointer = 1 File1.Refresh Dir1_Click Exit Sub mnuMove2: Screen.MousePointer = 1 Temp = MsgBox("There's a copy error !", vbOKOnly + vbExclamation, "IconAlbum Deluxe - System Message") End Sub Private Sub Tool1_Click(Index As Integer) If Index = 0 Then Newdir If Index = 1 Then RenameDirectory If Index = 2 Then RemoveDirectory If Index = 3 Then KillAll If Index = 4 Then CopyAll If Index = 5 Then Search If Index = 6 Then HelpForm.Show 1 End Sub Private Sub Tool1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) Tool1(Index).Picture = Image2(Index + 7).Picture End Sub Private Sub Tool1_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) Tool1(Index).Picture = Image2(Index).Picture End Sub